# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=openrgb
pkgver=0.9
pkgrel=0
pkgdesc="Open source RGB lighting control that doesn't depend on manufacturer software"
url="https://gitlab.com/CalcProgrammer1/OpenRGB"
arch="all !ppc64le" # Build fails and not supported on ppc64le
license="GPL-2.0-only"
makedepends="
	bash
	hidapi-dev
	libusb-dev
	mbedtls-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	"
source="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_$pkgver/OpenRGB-release_$pkgver.tar.gz
	0001-missing-include-select.patch
	modules-load.conf
	"
install="$pkgname.post-install"
builddir="$srcdir/OpenRGB-release_$pkgver"

build() {
	qmake-qt5 PREFIX=/usr
	make
}

check() {
	make check
}

package() {
	INSTALL_ROOT="$pkgdir" make install

	install -Dm644 "$srcdir"/modules-load.conf "$pkgdir"/usr/lib/modules-load.d/openrgb.conf
}

sha512sums="
3ac0cc6e6ec7b1719c0a4f069cface22f42d9d83d47ab1c5ddedb830568fdaa57956f73370a2daaecf8d694f66cbcf83b119935b5f4693a201adc36c63a21e1a  OpenRGB-release_0.9.tar.gz
5b153e597ed1a6f01c9838fda811fc3f81b2b25234de1dd841d0e8c6baef652ccb5eeb89de40a54c84e24c9b0e31657c969f093d1eba2e2e2fa5cf7929b79352  0001-missing-include-select.patch
6fc01a649fcdecd2168292ae383a5af61be8c3d3fb8b98026a779f09dc9c9e1643e3c55290abd3b262bfea55e9a6cacab902f0fae5c9396dc20028a37f566555  modules-load.conf
"
